package com.sfac.springboot.modules.test.entity;

import com.sfac.springboot.modules.common.entity.AbstractEntity;

import javax.persistence.*;
import java.util.List;

/**
 * @Description School
 * @Author JiangHu
 * @Date 2022/8/19 13:38
 */
@Entity
@Table(name = "test_school")
public class School extends AbstractEntity {
	private String name;
	@Column(columnDefinition = "text")
	private String description;
	@Transient
	private String code;

	@OneToMany(mappedBy = "school", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	private List<Clazz> clazzes;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public List<Clazz> getClazzes() {
		return clazzes;
	}

	public void setClazzes(List<Clazz> clazzes) {
		this.clazzes = clazzes;
	}
}
